bin = httpserver
cgi = test_cgi
cc = g++
LD_FLAGS = -std=c++11 -lpthread
curr=$(shell pwd)
src = main.cc

ALL:$(bin) $(cgi)
.PHONY:ALL

$(bin):$(src)
	$(cc) -o $@ $^ $(LD_FLAGS)

$(cgi):test_cgi.cc
	$(cc) -o $@ $^

.PHONY:output
output:
	mkdir -p output
	cp $(bin) output
	cp -rf wwwroot output
	cp $(cgi) output/wwwroot 

.PHONY:clean
clean:
	rm -f $(bin) $(cgi) 
	rm -rf output


